import request from "@/utils/request";

// 获取企业管理列表
export function getBusinessList(query) {
  return request({
    url: "/pekingFish/tenant-config/page",
    method: "get",
    params: query,
  });
}

// 新增企业商户信息
export function addBusinessInfo(data) {
  return request({
    url: "/pekingFish/tenant-config",
    method: "post",
    data: data,
  });
}

// 更新企业商户信息
export function updateBusinessInfo(data) {
  return request({
    url: "pekingFish/tenant-config",
    method: "put",
    data: data,
  });
}

// 获取所有企业列表
export function businessListsAll(query) {
  return request({
    url: "/pekingFish/tenant-config/list-all",
    method: "get",
    params: query,
  });
}

// 获取商户对应的所有分公司列表
export function subtenantListsAll(query) {
  return request({
    url: "/pekingFish/sub-tenant/listAllByTenantId",
    method: "get",
    params: query,
  });
}
